-
Notifications
You must be signed in to change notification settings - Fork 87
range methods on SortedSet / SortedMap #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The test doesn't compile with |
This version includes the new `rangeTo` / `rangeFrom` / `rangeUntil` methods.
Rebased, updated scala version, also added |
def newBuilder(): mutable.Builder[A, C] = cbf() | ||
def fromSpecific(it: TraversableOnce[A]): C = (cbf() ++= it).result() | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is already in src/main/scala-2.11_2.12/scala/collection/Factory.scala
, no?
Ah, Factory was already added in the meantime :-) Removed my version |
@@ -1,12 +1,10 @@ | |||
package collection | |||
package scala.collection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initially the tests were in the “empty” package. I moved them to the collection
package just to not be in the empty package. However I’d rather not use the scala.collection
package because it implicitly imports everything that is in that package, whereas user code doesn’t do that usually. I think we should put the tests in a dummy package just to reproduce the same context as in user code. (And that would solve the issue with BitSet
shadowing)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I'll move them. What do you think about test.scala.collection....
? Having them in _root_.collection
looked like an oversight.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be good now.
val m3 = mp.rangeUntil(x) | ||
assertEquals(m3: m.SortedMap[String, Int], mp.until(x)) | ||
} | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think of using TreeMap
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no mutable.TreeMap
in 2.11..
add Travis-CI config
No description provided.